/**
 * Created by wdj on 16/9/7.
 * router
 */

import Home from './views/Home';
import User from './views/User';
import Star from './views/Star';
import Setting from './views/Setting';
import SettingIndex from './views/settings/Index';
import GameCenter from './views/settings/GameCenter.vue';


module.exports = function (router) {

    router.map({
        '/home': {
            component: Home
        },
        '/profile': {
            component: User
        },
        '/star': {
            component: Star
        },
        '/cog': {
            component: Setting,
            subRoutes: {
                '/home': {
                    component: SettingIndex
                },
                '/a': {
                    component: Home
                },
                '/user': {
                    component: User
                },
                '/b': {
                    component: Star
                },
                '/c': {
                    component: SettingIndex
                },
                '/game': {
                    component: GameCenter
                }
            }
        }
    });

    router.redirect({
        '*': '/home',
    });

    router.alias({
        '/cog/': '/cog/home'
    })
};
